If you are trying to set up your ATtiny board and using the Digistump Board Manager, you might encounter this error. It seems Digistump has dropped support for this ( even their site appears not to be working anymore )
To fix the above, we will use another board manager that is also open source and based on the Digistump
It was shocking to learn that there is no easy way to set a custom audio as a ringtone for my iPhone, coming from Android.
Anyways, here is the step-by-step guide with images on how to do that,
First, download the ringtone you want or copy it over and get it in the files. That part is up to you; I just googled crank ringtone download and downloaded it
Now, install the GarageBand app from the App Store
After installation is complete, find the app in the home or app library
Hold the garage band icon until a menu appears with a lot of options
Now, click on the Create New Audio Recording button
Once the app opens, click on the tracks button :
Now click on the loop button: from the pop-up menu that opens, choose files
Click on Browse Items from the Files app
Select the song you want as a ringtone from the files; it should now appear under the files
Hold the song from files in the loops menu and drag it into the empty space in the recorder
Crop the song if you want only a specific portion, I mean, do your thing and get the part of the song that you like, make sure it’s below 30 seconds
Now click on the down arrow button in top left corner
Click on my songs, which should save your song and open a file browser-like interface
Now hold the song you want until the menu appears
Click on the share button and select ringtone
We are almost done now. Name your ringtone and click on export
Once export is successful, it will open a pop-up with the option to use sound, click on it
Select the Standard ringtone so it will be set as your call ringtone, or select another if you want to set it for text or for a specific contact
This microcontroller is crazy small, but has only 8 pins ( still enough to do a lot of crazy shit)
I saw this board while watching Mr. Robot S04E10: 410 Gone, and I wanted to try it. Yes, it can be used as a rubber ducky for HID attack testing, but I have no idea how to do it, so let’s start small with trying to blink the onboard LED
We will be using Arduino IDE for this. First, put this in “additional boards manager URLS”
For this, go to file-> Preferences and paste the following
http://digistump.com/package_digistump_index.json
Click ok, and then open Tools ->Board->Boards Manager and search for “digistump AVR Boards” and install it.
It took me not more than 40 minutes to get this site running from buying the domain, buying the hosting, setting up the WordPress, Cloudflare setup, SMTP setup and get everything running, after procrastinating on this very idea for 6 months
After getting some experience in web development world, I wanted to setup my own blog using WordPress, but I couldn’t decide on which domain to chose, which registrar to use, where to host it, how to setup email and all the bs that had little to no impact on the actual thing i was trying to do : setting up a site
Yesterday, after getting bored for a while, I decided to just set it up no matter what and not do anything else and within 40 minutes I was ready to write my first blog, makes me wonder why would i not act on this idea so long, investing time in trying to find the perfect domain, the perfect hosting service which doesn’t matter much.
maybe chasing perfection is just a way to delay action!
I wanted a 3d printer which will satisfy my curiosity, will do basic stuff while still being easy on the wallet and that’s when I found the Anycubic cobra 2 neo
The installation was quite simple and fun and I was able to do a test print within an hour of receiving the package
While the sample filament they gave did not last long it had a great quality which I’ve not been able to match with any other filaments till now, that said the printer works well regardless
While they advertise as fastest printer, to print anything usable and good quality, we have to print it at a slower pace so the printed objects are smooth
After getting to know it a bit, the first project I started was to print this toy gun
While the print had issues as the base of it started to peel of at the end of the print as it took more than 5 hours to print that but it was ok for me and this is how it turned out
Questions you might have
Is the Anycubic Kobra 2 Neo good?
Yes, for its price, it does a very good job
Is the Anycubic Kobra 2 good for beginners?
Yes, this is my first printer, and installation was super easy
What software works best with the Kobra 2 Neo?
Using the Anycubic slicer, they provide works well without issue on both Mac and Windows OS
There are lot of articles that define what flex box is, its different CSS properties etc, in this we will be creating a layout using flexbox given in below image and learn along the way
Lets convert this into a simple layout outline only, no content itself
Note: I am not very well versed with front-end stuff, so this just me learning and I might be totally wrong about this approach but will find out sooner,
Ok so from design, it seems the section has main 2 parts one at top which we will call nav section and on below it we call hero section
Nav section:
Nav section also has 2 parts, one for the sitename/logo and other for the actual menu items ( it can be divided further but lets keep it simple for now )
So we can use flexbox here to put this items in
This is the layout I created ( it is nowhere near the actual one but we are close
And here’s what I used,
display: flex – obviously we have to set display of the container to flex to make it flex box
justify-items
So basically the flex box has 2 axis main axis and cross axis, main axis means the imaginary line that the items are added in, for example in row direction i.e default flex direction the main axis will be the horizontal line and the cross axis will be the vertical line. This will be reversed for the column direction
To align items wrt to the main axis we use justify-content property and to align according wrt to cross axis we use align-items property, I mostly use justify-content in above since all the boxes are laid out in row direction
Flex grow : this property is for flex item and not the flex container itself, this will decide if the flex item will grow and by how much, greater the number greater the space will be taken by this item, we can set it to 0 so flex item does not grow at all beyond its defined size
Flex shrink: This is used to define if the flex item should decrease in size or not depending on the screen size, if set to 0, the item will not shrink
There are different units that can be used px, % , vw, vh, rem, em etc each with its own use cases.
Pixels ( px )
Pixels ( px ) is an absolute unit, it takes the number of pixels on the screen, eg. 20px
Percent ( % )
Percent is relative unit, it is percentage number of size of the parent, eg 20% will be 20% of the parent
px vs %
vw and vh
View Width and View height as the name suggests are relative to the viewport height and viewport width, so 50vw will be 50% of the view width, 50vh will be 50% of view height
REM and EM
These units are used for font sizes, rem is root font size and em is for parent font size , so 1rem will be 1x of root font size and 1em will be 1x of parent font size
eg, below the first rem em look same since their parent is the body so both rem and em values will be same, but in the second one I’ve put them in a div and added font size 30px for the div, so now the rem still takes the root font size but em takes the parent font size
Note: We can also use % for font sizes, it works same as em since both em and % are relative to parent, i.e 200% will be 2em
Ohk, I know the units, but which one to use where ?
for fonts ? use rem, using em is also possible but rem is better since it will scale according to root font size
For width ? set in percentage, maybe vw/vh
Height ? do we really need to set height ?
spacing ( padding, margin etc ) ? I am not really sure about this since I’ve been using px for this, but using em/rem to make it relative to font size seems like a good idea too
Pixels ? what about pixels ? well pixels are absolute i.e they are not going to scale,change relative to anything, they are going to stay the same so avoid overusing them and stick to relative units as much as possible
CSS position property defines how the element is positioned wrt to the document flow
There are following types of positions available
Static
Relative
Absolute
Fixed
Sticky
Static is what all elements are positioned by default, statically positioned elements follow the normal document flow
Relative positioned elements also follow the document flow same as static but it enables properties like top,bottom,left,right which we rarely use
Absolute position elements are not considered part of the document flow and changing their placement does not affect the other elements in the page
Absolute also allows for properties top,bottom,right,left which define the spacing of the elements from parent with one imp thing that the parent of the absolutely positioned element should be relatively positioned, if not then it takes the upper parent that is relatively positioned or the whole page itself
Fixed positioned, as it describes makes the element fixed to the page, i.e the element does not go out of view even when scrolling. (eg. top nav bars of the site that stay visible even when scrolling or the annoying ad banner that stay in the place even when scrolling )
Only pain point here is that this takes the element out of the document flow, so say for eg we want to put something above our nav menu, making it Fixed will not work, that’s when the sticky position is used
Sticky position is combination of both relative and fixed, i.e sticky element will act like a relatively positioned one when in view but as we scroll down it will become fixed, when it becomes sticky can be handled by the top property, it also again becomes relative when its parent is not longer in view, awesome right?
Z index and stacking order
When we position elements such that they stack on top of each other
Higher the value of z-index more on top the element will be, we can use this to stack the elements differently and create layouts and or components that look appealing
Stacking Context
stacking context determined how the elements layer on each other, eg, a div positioned as relative and z-index other than auto will create a stacking context for all the elements inside it so the elements will share the stacking context with their siblings but the parent div itself will be in its parents stacking context as single unit, i.e even if we increase z-index of the elements inside the div more than the parent of the div, they will still be layered below the sibling of parent if parent’s z index is lesser ( ahh so confusing )
eg, say we have 2 sibling divs
Now both of these are relative positioned, but as you can see, even if we increase the z-index of the children of context1 , they do not layer above the context2 since the stacking context restricts their layering to their own context
To bring the context1 up we have to increase z-index of the context1 to be greater than context2
All elements in the CSS are represented as box , box has following properties
The content
Padding around the content
Border
Margin
The height and width CSS properties take up only the content height and width but the computed height and width of the element will be including the padding and border
This behavior can be disabled by using box-sizing: border-box CSS rule, which will make the CSS height width properties take the padding and border also in the consideration by default.
Margin Collapsing:
Margin property is used to add spacing between two or more elements, it is outside the border and does not increase height/width of the element
When two elenents adjacnet to each other have margin, then their margin is collapsed and only the margin with bugger value is applied
eg. below the box1 has margin 70px , and box2 has100px, we’d think the space between them would be 170px but it is only 100px due to margin collapsing