This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -name "node_modules" -type d -prune -exec rm -rf '{}' + && find . -name "Pods" -type d -prune -exec rm -rf '{}' + && find . -name "build" -type d -prune -exec rm -rf '{}' + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class EventBase { | |
| subscribers = new Map(); | |
| onceEvents = new Map(); | |
| listeners = new Map(); | |
| on(eventName, callback) { | |
| this.subscribers.set(eventName, callback); | |
| } | |
| once(eventName, callback) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| { | |
| year:this.template.year, | |
| longMonthNames:[], | |
| shortMonthNames:[], | |
| longDayNames:[], | |
| shortDayNames:[], | |
| monthFirstDay:[], | |
| months:[ | |
| [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class fetchApi { | |
| // method = "GET"; | |
| defaultConfig = { | |
| method: "GET", // *GET, POST, PUT, DELETE, etc. | |
| mode: "*same-origin", // no-cors, cors, *same-origin | |
| cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached | |
| credentials: "*same-origin", // include, *same-origin, omit | |
| headers: { | |
| "Content-Type": "application/json", | |
| Accept: "application/json" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default listenerFunc => { | |
| Object.defineProperty(window.globalStore, "onChangeListener", { | |
| value: listenerFunc | |
| }); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Basic {} // Basic Sınıfını oluşturalı... | |
| const basicClass = new Basic();//Basic Sınıfını çağıralım... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form action="path/to/server/script" method="post" id="my_form"> | |
| <label>Name</label> | |
| <input type="text" name="name" /> | |
| <label>Email</label> | |
| <input type="email" name="email" /> | |
| <label>Website</label> | |
| <input type="url" name="website" /> | |
| <button type="submit" class="submit_button">Submit Form <button/> | |
| </form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $service_url = 'https://ronesis.com/API/api/v1/uye-bilgileri.php?uye_id=2087'; | |
| $curl = curl_init($service_url); | |
| curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
| $curl_response = curl_exec($curl); | |
| if ($curl_response === false) { | |
| $info = curl_getinfo($curl); | |
| curl_close($curl); | |
| die('error occured during curl exec. Additioanl info: ' . var_export($info)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const camelize = camelize(str) => { | |
| return str.replace(/\W+(.)/g, (match, chr) => | |
| { | |
| return chr.toUpperCase(); | |
| }); | |
| }; | |
| console.log(camelize("javaScript-Exercises")); | |
| console.log(camelize("JavaScript exercises")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default (key = "key") => { | |
| let ts = String(new Date().getTime()), | |
| i = 0, | |
| out = ""; | |
| for (i = 0; i < ts.length; i += 2) { | |
| out += Number(ts.substr(i, 2)).toString(36); | |
| } | |
| return key + out; | |
| }; |